---
title: Slider
description: A Jetpack Compose Slider component for selecting values from a range.
sourceCodeUrl: 'https://github.com/expo/expo/tree/main/packages/expo-ui'
packageName: '@expo/ui'
platforms: ['android']
---

import APISection from '~/components/plugins/APISection';
import { APIInstallSection } from '~/components/plugins/InstallSection';
import { ContentSpotlight } from '~/ui/components/ContentSpotlight';
import { Tabs, Tab } from '~/ui/components/Tabs';

A slider component that allows users to select a value from a continuous range by dragging a thumb along a track.

## Installation

<APIInstallSection />

## Usage

<Tabs>
  <Tab label="Preview">
    <ContentSpotlight
      alt="Slider component on Android."
      src="/static/images/expo-ui/slider/android.png"
      className="max-w-[480px]"
    />
  </Tab>
  <Tab label="Code">
    ```tsx
    import { Slider } from '@expo/ui/jetpack-compose';

    <Slider
      style={{ minHeight: 60 }}
      value={value}
      onValueChange={(value) => {
        setValue(value);
      }}
    />
    ```

  </Tab>
</Tabs>

> See [official Jetpack Compose documentation](https://developer.android.com/develop/ui/compose/components/slider) for more information.

## API

<APISection packageName="expo-ui/jetpack-compose/slider" apiName="Slider" />
